ADF.model.DatetimeModel = function() {
    ADF.model.DatetimeModel.superclass.constructor.call(this);
};

ADF.model.DatetimeModel.PROPERTY_ADFFORMAT = "format";

COM.util.defineClass(ADF.model.DatetimeModel, ADF.model.BaseModel, {

    initModel: function() {
        ADF.model.DatetimeModel.superclass.initModel.call(this);
        this.addPropertyDescriptor(new ADF.propertyDescriptor.DefaultPropertyDescriptor(ADF.model.DatetimeModel.PROPERTY_ADFFORMAT, "", "", true, "格式"));
    },
    setADFFormat: function(format) {
        this.setPropertyValue(ADF.model.DatetimeModel.PROPERTY_ADFFORMAT, format);
    },
    getADFFormat: function() {
        return this.getPropertyValue(ADF.model.DatetimeModel.PROPERTY_ADFFORMAT);
    },

    _getModelType: function() {
        return "ADF.model.DatetimeModel";
    },

    _getName : function(){
        return 'datetime';  
    },

    fillSerializedJson: function(jsonObject) {
        jsonObject[ADF.model.DatetimeModel.PROPERTY_ADFFORMAT] = this.getPropertyDescriptor(ADF.model.DatetimeModel.PROPERTY_ADFFORMAT).serialize();
    },

    _deserialize: function(jsonObject) {
        var newProp = null;

        newProp = new AGEF.PropertyDescriptor();
        newProp.deserialize(jsonObject[ADF.model.DatetimeModel.PROPERTY_ADFFORMAT]);
        this.propertyDescriptors.put(newProp.getName(), newProp);
    }
});